﻿@model Projectmanagement.Models._Customer
@{
    Layout = null;

    var files = ViewBag.files as List<Projectmanagement.Entity.TaskFile>;
   
}
<script type="text/javascript">
    var fileName = "";

    function UploadProfileImage_OnUpload(e) {

        var id = $("#ID").val();
        var files = e.files;

        // Check the extension of each file and abort the upload if it is not .jpg
        $.each(files, function () {

            fileName = this.name + ',' + fileName;
            //            if (this.extension.toLowerCase() != ".jpg" && this.extension.toLowerCase() != ".png" && this.extension.toLowerCase() && ".jpeg" && this.extension.toLowerCase() != ".gif") {

            //                e.preventDefault();
            //                return false;
            //            }
        });

        $("#CustomerFileId").val(fileName);
        e.data = { strImageName: fileName };
    }
    
   
</script>
<fieldset style="width: 1250px;">
    <legend>酒店供应商</legend>
    <table class="noline" style="line-height: 30px; border:1px solid #eee; border-bottom:0; margin-top:10px;">
        <tr><td colspan="8" style="height:10px;"></td></tr>
        <tr>
            <td align="right">@Html.LabelFor(x => x.CustomerName):
            </td>
            <td>
                @Html.TextBoxFor(x => x.CustomerName, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.CustomerName)
            </td>
            <td align="right">@Html.LabelFor(x => x.StarLevel):
            </td>
            <td>
                @Html.DropDownListFor(x => x.StarLevel, new[] { new SelectListItem() { Text = "三星级", Value = "1" }, new SelectListItem() { Text = "四星级", Value = "2" }, new SelectListItem() { Text = "五星级", Value = "3" } }, "请选择......", new { style = "width:165px;" })<br />
            </td>
            <td align="right">@Html.LabelFor(x => x.Country):
            </td>
            <td>
                @Html.DropDownListFor(x => x.Country, Model.GetCountrySelectListItems(), "请选择......", new { style = "width:165px;" })
            </td>
            <td align="right">@Html.LabelFor(x => x.City):
            </td>
            <td>
                @Html.DropDownListFor(x => x.City, Model.GetCitySelectListItems(Model.Country.ToString()), "请选择......", new { style = "width:165px;" })
            </td>
        </tr>
        <tr>
            <td align="right">@Html.LabelFor(x => x.CustomerAddress):
            </td>
            <td>
                @Html.TextBoxFor(x => x.CustomerAddress, new { style = "width:165px;" })<br />
            </td>
            <td colspan="6"></td>
        </tr>
        <tr><td colspan="8" style="height:10px;"></td></</tr>
        <tr style="line-height: 1px; background:#f1f1f1;">
            <td colspan="8">
                <p style="font-weight: bolder">
                    联系人</p>
            </td>
        </tr>
        <tr><td colspan="8" style="height:10px;"></td></tr>
        <tr>
            <td align="right" style="width:100px">@Html.LabelFor(x => x.ContactName):
            </td>
            <td>
                @Html.TextBoxFor(x => x.ContactName, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.ContactName)
            </td>
            <td align="right">@Html.LabelFor(x => x.ContactTitle):
            </td>
            <td>
                @Html.TextBoxFor(x => x.ContactTitle, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.ContactTitle)
            </td>
            <td align="right">@Html.LabelFor(x => x.SuperiorName):
            </td>
            <td>
                @Html.TextBoxFor(x => x.SuperiorName, new { style = "width:165px;" })<br />
            </td>
            <td align="right">@Html.LabelFor(x => x.SuperiorTitle):
            </td>
            <td>
                @Html.TextBoxFor(x => x.SuperiorTitle, new { style = "width:165px;" })<br />
            </td>
        </tr>
        <tr>
            <td align="right">@Html.LabelFor(x => x.ContactEmail):
            </td>
            <td>
                @Html.TextBoxFor(x => x.ContactEmail, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.ContactEmail)
            </td>
            <td align="right">@Html.LabelFor(x => x.ManagerialBody):
            </td>
            <td>
                @Html.TextBoxFor(x => x.ManagerialBody, new { style = "width:165px;" })<br />
            </td>
            <td align="right">@Html.LabelFor(x => x.ContactPlane):
            </td>
            <td>
                @Html.TextBoxFor(x => x.ContactPlane, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.ContactPlane)
            </td>
            <td align="right">@Html.LabelFor(x => x.ContactMobile):
            </td>
            <td>
                @Html.TextBoxFor(x => x.ContactMobile, new { style = "width:165px;" })<br />
            </td>
        </tr>
        <tr><td colspan="8" style="height:10px;"></td></</tr>
        <tr style="line-height: 1px; background:#f1f1f1">
            <td colspan="8">
                <p style="font-weight: bolder">
                    酒店描述</p>
            </td>
        </tr>
        <tr><td colspan="8" style="height:10px;"></td></tr>
        <tr>
            <td align="right">@Html.LabelFor(x => x.DescCreatedDate):
            </td>
            <td>
                @(Html.Telerik().DatePicker()
                      .Name("DescCreatedDate")
              .Value(DateTime.Now)
                              .HtmlAttributes(new { style = "width:165px" })
        )
                @*@Html.EditorFor(x => x.DescCreatedDate, new { style = "width:165px;" })<br />*@
                @Html.ValidationMessageFor(x => x.DescCreatedDate)
            </td>
            <td align="right">@Html.LabelFor(x => x.DescUpdateDate):
            </td>
            <td>
                @(Html.Telerik().DatePicker()
                              .Name("DescUpdateDate")
              .Value(DateTime.Now)
                              .HtmlAttributes(new { style = "width:165px" })
        )
                @*@Html.EditorFor(x => x.DescUpdateDate, new { style = "width:165px;" })<br />*@
                @Html.ValidationMessageFor(x => x.DescUpdateDate)
            </td>
            <td style="display: none" align="right">@Html.LabelFor(x => x.DescSoundEquipment):
            </td>
            <td style="display: none">
                @Html.TextBoxFor(x => x.DescSoundEquipment, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.DescSoundEquipment)
            </td>
            <td style="display: none" align="right">@Html.LabelFor(x => x.DescJK):
            </td>
            <td style="display: none">
                @Html.TextBoxFor(x => x.DescJK, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.DescJK)
            </td>
            <td align="right">@Html.LabelFor(x => x.DescDegree):
            </td>
            <td>
                @Html.TextBoxFor(x => x.DescDegree, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.DescDegree)
            </td>
            <td align="right">@Html.LabelFor(x => x.RoomCount):
            </td>
            <td>
                @Html.TextBoxFor(x => x.RoomCount, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.RoomCount)
            </td>
        </tr>
        <tr style="line-height: 1px; display: none">
            <td colspan="8">
                <p style="font-weight: bolder">
                    location说明</p>
            </td>
        </tr>
        <tr style="display: none">
            <td align="right">@Html.LabelFor(x => x.LocationCityDistance):
            </td>
            <td>
                @Html.TextBoxFor(x => x.LocationCityDistance, new { style = "width:165px;" })公里
            </td>
            <td align="right">@Html.LabelFor(x => x.LocationAirportDistance):
            </td>
            <td>
                @Html.TextBoxFor(x => x.LocationAirportDistance, new { style = "width:165px;" })公里
            </td>
            <td align="right">@Html.LabelFor(x => x.LocationStationDistance):
            </td>
            <td>
                @Html.TextBoxFor(x => x.LocationStationDistance, new { style = "width:165px;" })公里
            </td>
            <td align="right">@Html.LabelFor(x => x.LocationSubwayDistance):
            </td>
            <td>
                @Html.TextBoxFor(x => x.LocationSubwayDistance, new { style = "width:165px;" })公里
            </td>
        </tr>
        <tr style="line-height: 1px; display: none;">
            <td colspan="8">
                <p style="font-weight: bolder">
                    会议厅描述</p>
            </td>
        </tr>
        <tr style="display: none">
            <td align="right">
                分割:
            </td>
            <td>
                @Html.DropDownListFor(x => x.ChamberStructure, new[] { new SelectListItem() { Text = "分割", Value = "1" }, new SelectListItem() { Text = "不可分割", Value = "2" } }, "请选择......", new { style = "width:165px;" })<br />
            </td>
            <td align="right" id="ChamberStructureDescDis">@Html.LabelFor(x => x.ChamberStructureDesc):
            </td>
            <td>
                @Html.TextBoxFor(x => x.ChamberStructureDesc, new { style = "width:165px;" })<br />
            </td>
            <td align="right">@Html.LabelFor(x => x.PostDesc):
            </td>
            <td>
                @Html.TextBoxFor(x => x.PostDesc, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.PostDesc)
            </td>
            <td align="right">@Html.LabelFor(x => x.ChamberFloorQuantity):
            </td>
            <td>
                @Html.TextBoxFor(x => x.ChamberFloorQuantity, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.ChamberFloorQuantity)
            </td>
        </tr>
        <tr style="display: none">
            <td align="right">@Html.LabelFor(x => x.ChamberDesc):
            </td>
            <td>
                @Html.TextBoxFor(x => x.ChamberDesc, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.ChamberDesc)
            </td>
            <td align="right">@Html.LabelFor(x => x.ChamberStorey):
            </td>
            <td>
                @Html.TextBoxFor(x => x.ChamberStorey, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.ChamberStorey)
            </td>
            <td align="right">@Html.LabelFor(x => x.ChamberSize):
            </td>
            <td>
                @Html.TextBoxFor(x => x.ChamberSize, new { style = "width:165px;" })<br />
                @*@Html.DropDownListFor(x => x.ChamberSize, new[] { new SelectListItem() { Text = "剧院式", Value = "1" }, new SelectListItem() { Text = "课桌式", Value = "2" }, new SelectListItem() { Text = "圆桌式", Value = "3" } }, "请选择......", new { style = "width:165px;" })<br />*@
            </td>
            <td align="right">@Html.LabelFor(x => x.ChamberArea):
            </td>
            <td>
                @Html.TextBoxFor(x => x.ChamberArea, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.ChamberArea)
            </td>
        </tr>
        <tr><td colspan="8" style="height:10px;"></td></</tr>
        <tr style="line-height: 1px; background:#f1f1f1;">
            <td colspan="8">
                <p style="font-weight: bolder">
                    会议包价（两个茶歇+午餐）</p>
            </td>
        </tr>
        <tr><td colspan="8" style="height:10px;"></td></tr>
        <tr>
            <td align="right">@Html.LabelFor(x => x.QuoteMeetPrice):
            </td>
            <td style="width: 40px">
                @(Html.Telerik().CurrencyTextBox()
                    .Name("QuoteMeetPrice")
                    .Value(0)
                                    .HtmlAttributes(new { style = "width: 60px" })
      )
                @*@Html.TextBoxFor(x => x.QuoteMeetPrice, new { style = "width:165px;" })<br />*@
                @Html.ValidationMessageFor(x => x.QuoteMeetPrice)
            </td>
            <td style="display: none" align="right">@Html.LabelFor(x => x.QuoteMeetPriceDesc):
            </td>
            <td style="display: none">
                @Html.TextBoxFor(x => x.QuoteMeetPriceDesc, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.QuoteMeetPriceDesc)
            </td>
            <td align="right">@Html.LabelFor(x => x.QuoteMeetFial):
            </td>
            <td>
                @(Html.Telerik().CurrencyTextBox()
                            .Name("QuoteMeetFial")
                                    .Value(0)
                                            .HtmlAttributes(new { style = "width:120px" })
      )
                @*@Html.TextBoxFor(x => x.QuoteMeetFial, new { style = "width:165px;" })<br />*@
                @Html.ValidationMessageFor(x => x.QuoteMeetFial)
            </td>
            <td align="right" style="display: none">@Html.LabelFor(x => x.QuoteMeetGarantDesc):
            </td>
            <td style="display: none">
                @Html.TextBoxFor(x => x.QuoteMeetGarantDesc, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.QuoteMeetGarantDesc)
            </td>
            <td align="right" style="display: none">@Html.LabelFor(x => x.QuoteMeetPeople):
            </td>
            <td style="display: none">
                @Html.TextBoxFor(x => x.QuoteMeetPeople, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.QuoteMeetPeople)
            </td>
            <td colspan="4">&nbsp;</td>
        </tr>
        <tr>
            <td align="right" style="vertical-align:top">@Html.LabelFor(x => x.QuoteMeetDesc):
            </td>
            <td colspan="7">
                @Html.TextAreaFor(x => x.QuoteMeetDesc, new { style = "width: 95.3%;" })<br />
                @Html.ValidationMessageFor(x => x.QuoteMeetDesc)
            </td>
        </tr>
        <tr><td colspan="8" style="height:10px;"></td></</tr>
        <tr style="line-height: 1px; background:#f1f1f1;">
            <td colspan="8">
                <p style="font-weight: bolder">
                    场租</p>
            </td>
        </tr>
        <tr><td colspan="8" style="height:10px;"></td></tr>
        <tr>
            <td align="right">@Html.LabelFor(x => x.QuoteRoomPrice):
            </td>
            <td>
                @(Html.Telerik().CurrencyTextBox()
                                    .Name("QuoteRoomPrice")
                                            .Value(0)
                                                    .HtmlAttributes(new { style = "width:120px" })
      )
                @*@Html.TextBoxFor(x => x.QuoteRoomPrice, new { style = "width:165px;" })<br />*@
                @Html.ValidationMessageFor(x => x.QuoteRoomPrice)
            </td>
            <td style="display: none" align="right">@Html.LabelFor(x => x.QuoteRoomPriceDesc):
            </td>
            <td style="display: none">
                @Html.TextBoxFor(x => x.QuoteRoomPriceDesc, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.QuoteRoomPriceDesc)
            </td>
            <td align="right">@Html.LabelFor(x => x.QuoteRoomFinal):
            </td>
            <td>
                @(Html.Telerik().CurrencyTextBox()
                                            .Name("QuoteRoomFinal")
                                                    .Value(0)
                                                            .HtmlAttributes(new { style = "width:120px" })
      )
                @* @Html.TextBoxFor(x => x.QuoteRoomFinal, new { style = "width:165px;" })<br />*@
                @Html.ValidationMessageFor(x => x.QuoteRoomFinal)
            </td>
            <td colspan="4">&nbsp;</td>
        </tr>
        <tr>
            <td align="right" style="vertical-align:top">@Html.LabelFor(x => x.QuoteRoomDesc):
            </td>
            <td colspan="7">
                @Html.TextAreaFor(x => x.QuoteRoomDesc, new { style = "width: 95.3%;" })<br />
                @Html.ValidationMessageFor(x => x.QuoteRoomDesc)
            </td>
        </tr>
        <tr><td colspan="8" style="height:10px;"></td></</tr>
        <tr style="line-height: 1px; background:#f1f1f1">
            <td colspan="8">
                <p style="font-weight: bolder">
                    午餐</p>
            </td>
        </tr>
        <tr><td colspan="8" style="height:10px;"></td></tr>
        <tr>
            <td align="right">@Html.LabelFor(x => x.QuoteLunchPrice):
            </td>
            <td>
                @(Html.Telerik().CurrencyTextBox()
                                                    .Name("QuoteLunchPrice")
                                                            .Value(0)
                                                                    .HtmlAttributes(new { style = "width:120px" })
      )
                @*@Html.TextBoxFor(x => x.QuoteLunchPrice, new { style = "width:165px;" })<br />*@
                @Html.ValidationMessageFor(x => x.QuoteLunchPrice)
            </td>
            <td style="display: none" align="right">@Html.LabelFor(x => x.QuoteLunchPriceDesc):
            </td>
            <td style="display: none">
                @Html.TextBoxFor(x => x.QuoteLunchPriceDesc, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.QuoteLunchPriceDesc)
            </td>
            <td align="right">@Html.LabelFor(x => x.QuoteLunchFinal):
            </td>
            <td>
                @(Html.Telerik().CurrencyTextBox()
                                                            .Name("QuoteLunchFinal")
                                                                    .Value(0)
                                                                            .HtmlAttributes(new { style = "width:120px" })
      )
                @* @Html.TextBoxFor(x => x.QuoteLunchFinal, new { style = "width:165px;" })<br />*@
                @Html.ValidationMessageFor(x => x.QuoteLunchFinal)
            </td>
            <td align="right">@Html.LabelFor(x => x.QuoteLunchMaxPeople):
            </td>
            <td>
                @Html.TextBoxFor(x => x.QuoteLunchMaxPeople, new { style = "width:165px;" })<br />
            </td>
            <td colspan="2">&nbsp;</td>
        </tr>
        <tr>
            <td align="right" style="vertical-align:top">@Html.LabelFor(x => x.QuoteLunchDesc):
            </td>
            <td colspan="7">
                @Html.TextAreaFor(x => x.QuoteLunchDesc, new { style = "width: 95.3%;" })<br />
                @Html.ValidationMessageFor(x => x.QuoteRoomDesc)
            </td>
        </tr>
        <tr><td colspan="8" style="height:10px;"></td></</tr>
        <tr style="line-height: 1px; background:#f1f1f1">
            <td colspan="8">
                <p style="font-weight: bolder">
                    茶歇</p>
            </td>
        </tr>
        <tr><td colspan="8" style="height:10px;"></td></tr>
        <tr>
            <td align="right">@Html.LabelFor(x => x.QuoteTeaPrice):
            </td>
            <td>
                @(Html.Telerik().CurrencyTextBox().Name("QuoteTeaPrice").Value(0).HtmlAttributes(new { style = "width:120px" })
      )
                @*@Html.TextBoxFor(x => x.QuoteTeaPrice, new { style = "width:165px;" })<br />*@
                @Html.ValidationMessageFor(x => x.QuoteTeaPrice)
            </td>
            <td style="display: none" align="right">@Html.LabelFor(x => x.QuoteTeaPriceDesc):
            </td>
            <td style="display: none">
                @Html.TextBoxFor(x => x.QuoteTeaPriceDesc, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.QuoteTeaPriceDesc)
            </td>
            <td align="right">@Html.LabelFor(x => x.QuoteTeaFinal):
            </td>
            <td>
                @(Html.Telerik().CurrencyTextBox().Name("QuoteTeaFinal").Value(0).HtmlAttributes(new { style = "width:120px" })
      )
                @* @Html.TextBoxFor(x => x.QuoteTeaFinal, new { style = "width:165px;" })<br />*@
                @Html.ValidationMessageFor(x => x.QuoteTeaFinal)
            </td>
            <td colspan="4">&nbsp;</td>
        </tr>
        <tr>
            <td align="right" style="vertical-align:top">@Html.LabelFor(x => x.QuoteTeaDesc):
            </td>
            <td colspan="7">
                @Html.TextAreaFor(x => x.QuoteTeaDesc, new { style = "width: 95.3%;" })<br />
                @Html.ValidationMessageFor(x => x.QuoteTeaDesc)
            </td>
        </tr>
        <tr><td colspan="8" style="height:10px;"></td></</tr>
        <tr style="line-height: 1px; background:#f1f1f1">
            <td colspan="8">
                <p style="font-weight: bolder">
                    房型</p>
            </td>
        </tr>
        <tr><td colspan="8" style="height:10px;"></td></tr>
        <tr>
            <td align="right">@Html.LabelFor(x => x.RoomStane):
            </td>
            <td>
                @Html.TextBoxFor(x => x.RoomStane, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.RoomStane)
            </td>
            <td align="right">@Html.LabelFor(x => x.RoomLarge):
            </td>
            <td>
                @Html.TextBoxFor(x => x.RoomLarge, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.RoomLarge)
            </td>
            <td align="right">@Html.LabelFor(x => x.RoomAdmin):
            </td>
            <td>
                @Html.TextBoxFor(x => x.RoomAdmin, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.RoomAdmin)
            </td>
            <td align="right">@Html.LabelFor(x => x.RoomAdminLarge):
            </td>
            <td>
                @Html.TextBoxFor(x => x.RoomAdmin, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.RoomAdminLarge)
            </td>
        </tr>
        <tr>
            <td align="right">@Html.LabelFor(x => x.RoomSuite):
            </td>
            <td>
                @Html.TextBoxFor(x => x.RoomSuite, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.RoomSuite)
            </td>
            <td align="right">@Html.LabelFor(x => x.RoomPercent):
            </td>
            <td>
                @(Html.Telerik().PercentTextBox().Name("RoomPercent").Value(0).HtmlAttributes(new { style = "width:163px" })
      )
                @*@Html.TextBoxFor(x => x.RoomPercent, new { style = "width:165px;" })<br />*@
                @Html.ValidationMessageFor(x => x.RoomPercent)
            </td>
            <td align="right">@Html.LabelFor(x => x.RoomPrice):
            </td>
            <td>
                @(Html.Telerik().CurrencyTextBox().Name("RoomPrice").Value(0).HtmlAttributes(new { style = "width:163px" })
      )
                @Html.ValidationMessageFor(x => x.RoomPrice)
            </td>
            <td style="display: none" align="right">@Html.LabelFor(x => x.RoomDesc):
            </td>
            <td style="display: none">
                @Html.TextBoxFor(x => x.RoomDesc, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.RoomDesc)
            </td>
            <td align="right">@Html.LabelFor(x => x.RoomFinalPrice):
            </td>
            <td>
                @(Html.Telerik().CurrencyTextBox().Name("RoomFinalPrice").Value(0).HtmlAttributes(new { style = "width:163px" })
      )
                @Html.ValidationMessageFor(x => x.RoomFinalPrice)
            </td>
        </tr>
        <tr>
            <td align="right" style="vertical-align:top">@Html.LabelFor(x => x.RoomFinalPriceDesc):
            </td>
            <td colspan="7">
                @Html.TextAreaFor(x => x.RoomFinalPriceDesc, new { style = "width: 95.3%;" })<br />
                @Html.ValidationMessageFor(x => x.RoomFinalPriceDesc)
            </td>
        </tr>
        <tr style="line-height: 1px; display: none;">
            <td colspan="8">
                <p style="font-weight: bolder">
                    租车报价说明</p>
            </td>
        </tr>
        <tr style="display: none">
            <td style="display: none" align="right">@Html.LabelFor(x => x.CarModelPrice):
            </td>
            <td style="display: none">
                @Html.TextBoxFor(x => x.CarModelPrice, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.CarModelPrice)
            </td>
            <td align="right">@Html.LabelFor(x => x.CarOrNot):
            </td>
            <td>
                @Html.TextBoxFor(x => x.CarOrNot, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.CarOrNot)
            </td>
            <td align="right">@Html.LabelFor(x => x.CarPlace):
            </td>
            <td>
                @Html.TextBoxFor(x => x.CarPlace, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.CarPlace)
            </td>
        </tr>
        <tr><td colspan="8" style="height:10px;"></td></</tr>
        <tr style="line-height: 1px; background:#f1f1f1">
            <td colspan="8">
                <p style="font-weight: bolder">
                    其他报价说明</p>
            </td>
        </tr>
        <tr><td colspan="8" style="height:10px;"></td></tr>
        <tr>
            <td align="right">@Html.LabelFor(x => x.OtherCock):
            </td>
            <td>
                @Html.TextBoxFor(x => x.OtherCock, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.OtherCock)
            </td>
            <td align="right">@Html.LabelFor(x => x.OtherWesternFood):
            </td>
            <td>
                @Html.TextBoxFor(x => x.OtherWesternFood, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.OtherWesternFood)
            </td>
            <td align="right">@Html.LabelFor(x => x.OtherCenterFood):
            </td>
            <td>
                @Html.TextBoxFor(x => x.OtherCenterFood, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.OtherCenterFood)
            </td>
            <td align="right">@Html.LabelFor(x => x.OtherNote):
            </td>
            <td>
                @Html.TextBoxFor(x => x.OtherNote, new { style = "width:165px;" })<br />
                @Html.ValidationMessageFor(x => x.OtherNote)
            </td>
        </tr>
        <tr><td colspan="8" style="height:10px;"></td></</tr>
        <tr style="line-height: 1px;">
            <td align="right">
                <label>文件/图片上传:</label>
            </td>
            <td colspan="7">
                @Html.HiddenFor(m => m.CustomerFileId)
                @Html.HiddenFor(m => m.ID)
                @(Html.Telerik().Upload()
                .Name("attachments")
        .Multiple((bool)ViewData["multiple"])
        .Async(async => async
                                                    .Save("Save", "Customer", new { strImageName = Model.CustomerFileId })
                                            .Remove("Remove", "Customer")
            .AutoUpload((bool)ViewData["autoUpload"])

        )
                .ClientEvents(events => events.OnUpload("UploadProfileImage_OnUpload").OnComplete("OnComplete"))
)
            </td>
        </tr>
        <tr><td colspan="8" style="height:10px;"></td></</tr>
        <tr style="line-height: 1px;">
            <td align="right">
                <label>
                    文件/图片下载:</label>
            </td>
            <td colspan="7">
                <div id="filelist">
                    <ul id="filelist_file">
                    </ul>
                    <ul id="filelist_img">
                    </ul>
                </div>
            </td>
        </tr>
    </table>
    <table class="noline" style="border:1px solid #eee; border-top:0; padding-top:10px;">
        <tr>
            <td align="right" style="width: 110px; vertical-align:top;">@Html.LabelFor(x => x.CommentCost):
            </td>
            <td colspan="7">
                @Html.TextAreaFor(x => x.CommentCost, new { style = "width: 95.3%;" })<br />
                @*@Html.TextBoxFor(x => x.CommentCost, new { style = "width:165px;" })<br />*@
                @Html.ValidationMessageFor(x => x.CommentCost)
            </td>
        </tr>
        <tr>
            <td align="right" style="vertical-align:top">@Html.LabelFor(x => x.CommentVirtue):
            </td>
            <td colspan="7">
                @Html.TextAreaFor(x => x.CommentVirtue, new { style = "width: 95.3%;" })<br />
                @*@Html.TextBoxFor(x => x.CommentVirtue, new { style = "width:165px;" })<br />*@
                @Html.ValidationMessageFor(x => x.CommentVirtue)
            </td>
        </tr>
        <tr>
            <td align="right" style="vertical-align:top">@Html.LabelFor(x => x.CommentDefect):
            </td>
            <td colspan="7">
                @Html.TextAreaFor(x => x.CommentDefect, new { style = "width: 95.3%;" })<br />
                @*@Html.TextBoxFor(x => x.CommentDefect, new { style = "width:165px;" })<br />*@
                @Html.ValidationMessageFor(x => x.CommentDefect)
            </td>
        </tr>
        <tr>
            <td align="right" style="vertical-align:top">@Html.LabelFor(x => x.CommentCate):
            </td>
            <td colspan="7">
                @Html.TextAreaFor(x => x.CommentCate, new { style = "width: 95.3%;" })<br />
                @* @Html.TextBoxFor(x => x.CommentCate, new { style = "width:165px;" })<br />*@
                @Html.ValidationMessageFor(x => x.CommentCate)
            </td>
        </tr>
    </table>
</fieldset>
@Html.Telerik().Window().Name("showImage").Title("显示图片").Content(
@<text>
<div id="ImgField">
</div>
</text>
    ).Visible(false).Resizable().Width(600).Height(480)
<style>
    .t-upload
    {
        float: left;
    }
    
    .note
    {
        clear: left;
        float: left;
    }
    .noline
    {
        width: 100%;
    }
    .noline, .noline tr, .noline td
    {
        border: 0;
        padding: 2px;
    }
    #filelist_file
    {
        clear: both;
        display: inline-block;
        width: 1071px;
    }
    #filelist_img
    {
        clear: both;
        display: inline-block;
        padding-top: 15px;
        margin-top: 5px;
        width: 1071px;
        border-top: 1px dotted #eee;
    }
    #filelist_file li
    {
        width: 357px;
        height: 28px;
        float: left;
    }
    #filelist_img li
    {
        width: 357px;
        float: left;
    }
</style>
<script type="text/javascript">
    $(function () {
        widthSize();
        $("#ChamberStructure").change(function () {
            var sel = $(this).val();
            if (sel == "1") {
                $("#ChamberStructureDesc").show();
                $("#ChamberStructureDescDis").show();
            }
            else {
                $("#ChamberStructureDesc").hide();
                $("#ChamberStructureDescDis").hide();
                $("#ChamberStructureDesc").val("");
            }
        });
        $("#Country").change(function () {
            var selec = $(this).val();
            var url = "/Customer/GetCitySelectListItems/" + $(this).val() + "/";
            $("#City").find("option").remove();
            $.getJSON(url, { 'countryID': selec }, function (data) {
                $.each(data, function (i, item) {
                    $("<option></option>").val(item["ID"]).text(item["Name"]).appendTo($("#City"));
                });
            });

        });
    });
    function uploadfiles() {
        $.ajaxFileUpload({
            url: "/task/UploadTaskFiles/@Model.ID",
            secureuri: false,
            fileElementId: 'taskfiles',
            dataType: "json",
            success: function (data, status) {
                if (data.validate) {
                    $("#filelist").append(decodeURIComponent(data.msg));
                }
            }
        });
    }
    function widthSize() {
        $("#QuoteMeetPrice").width(165);
        $("#QuoteMeetFial").width(165);
        $("#QuoteRoomPrice").width(165);
        $("#QuoteRoomFinal").width(165);
        $("#QuoteLunchPrice").width(165);
        $("#QuoteLunchFinal").width(165);
        $("#QuoteTeaPrice").width(165);
        $("#QuoteTeaFinal").width(165);
        $("#RoomPercent").width(165);
        $("#RoomPrice").width(165);
        $("#RoomFinalPrice").width(165);
    }
    var count = 0;
    function getFile() {
        var id = $("#ID").val();
        var url = "/Customer/GetFile/";
        $.post(url, { 'ID': id }, function (data) {
            $.each(data, function (i, item) {
                var result = /\.[^\.]+/.exec(item.FileName);
                if (result != ".jpg" && result != ".png" && result && ".jpeg" && result != ".gif") {
                    $("#filelist_file").append(
                    '<li id=tf-' + item.ID + '>' +
                    '<a href=' + item.FileUrl + ' target="_blank">' + item.FileName + '</a>' + '&nbsp;' +
                    '<a class="t-button" href="javascript:;" onclick="deletetaskfile(' + item.ID + ')">删除</a>' +
                    '</li>');
                }
                else {
                    $("#filelist_img").append(
                    '<li id=tf-' + item.ID + '>' +
                    '<img width="100px" height="60px" id=' + item.ID + ' src="' + item.FileUrl + '" onclick ="showImageWindow(' + item.ID + ')"/>' +
                    '<a href=' + item.FileUrl + ' target="_blank">' + item.FileName + '</a>' + '&nbsp;' +
                    '<a class="t-button" href="javascript:;" onclick="deletetaskfile(' + item.ID + ')">删除</a>' +
                    '</li>');
                }
            });

        });

    }

    (function () {

        if ((document.readyState && document.readyState == 'complete' && $("#ID").val() != "0") || count == 5) {


            var id = $("#ID").val();
            getFile();
        } else {
            count++;
            setTimeout(arguments.callee, 10);
        }
    })();

    function deletetaskfile(id) {

        var name = $("#tf-" + id).find("a").eq(0).text();
        if (confirm("确定将" + name + "删除吗")) {
            $.ajax({
                url: "/Customer/deletefile/" + id,
                type: "post",
                dataType: "json",
                success: function (data, status) {

                    if (data == "OK") {
                        $("#tf-" + id).remove();
                    }
                }
            });
        }
    }
    function showImageWindow(e) {
        $("#ImgField").empty();
        var url = $("#" + e).attr("src");
        var window = $("#showImage").data("tWindow");
        $("#ImgField").append("<img  alt='' id=" + e + " src=" + url + " />");
        window.center().open();
    }
</script>
